package com.hnkywl.sts.quartz;

import com.hnkywl.sts.service.taskdeal.DoCapitalAllocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 资金分配到对应的采购单，定时任务
 * Created with IntelliJ IDEA.
 * User: nianjunyan
 * Date: 13-5-18
 * Time: 下午2:25
 * To change this template use File | Settings | File Templates.
 */
public class FundAllotJob extends QuartzJobBean {

    // 定义日志
    private static Log log = LogFactory.getLog(FundAllotJob.class);
    // 处理资金分配service
    private DoCapitalAllocation doCapitalAllocation;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("FundAllotJob 开始执行............");
        doCapitalAllocation.setCapitalAllocation();
        log.info("FundAllotJob 执行结束............");
    }

    public void setDoCapitalAllocation(DoCapitalAllocation doCapitalAllocation) {
        this.doCapitalAllocation = doCapitalAllocation;
    }
}
